//
//  ChangeImageTineColorViewController.m
//  CoreAnimation
//
//  Created by 张国文 on 16/12/9.
//  Copyright © 2016年 hangzhouyijiyin. All rights reserved.
//

#import "ChangeImageTineColorViewController.h"
#import "UIImage+ZChangeTineColor.h"

@interface ChangeImageTineColorViewController ()

@end

@implementation ChangeImageTineColorViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    /**
       黑色透明，不反射。
       白色不透明，全反射。
       
     */
    
// 这个方法必须是alpha通道为“是”的图片才(就是图片是透明的)有效果
    
    // 原始的有渐变图片
    UIImageView *orginGradientImageV =[[UIImageView alloc] initWithFrame:CGRectMake(120, 20, 150, 150)];
    orginGradientImageV.image = [UIImage imageWithName:@"Gradient"];
    [self.view addSubview:orginGradientImageV];
    
    
    // 改变颜色后的有渐变图片
    UIImageView *changeColorGradientImageV = [[UIImageView alloc] initWithFrame:CGRectMake(120, 250, 150, 150)];
    UIImage *tempImageTwo = [UIImage imageWithName:@"Gradient"];
    UIImage *resultImageTwo = [tempImageTwo imageWithTintColor:[[UIColor redColor] colorWithAlphaComponent:0.3]];
    changeColorGradientImageV.image = resultImageTwo;
    [self.view addSubview:changeColorGradientImageV];
    
    
    
}



@end
